package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.Collect;
import cn.wolfcode.trip.base.mapper.CollectMapper;
import cn.wolfcode.trip.base.service.ICollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CollectServiceImpl implements ICollectService {

    @Autowired
    private CollectMapper collectMapper;
    @Override
    public Collect selectByIdAndType(Long userId,Long collectId, int type) {
        return collectMapper.selectByIdAndType(userId,collectId,type);
    }

    @Override
    public void deleteByUserIdAndType(Long userId,Long collectId,int type) {
        collectMapper.deleteByUserIdAndType(userId,collectId,type);
    }

    @Override
    public void saveByUserIdAndType(Long userId, Long collectId, int type) {
        collectMapper.saveByUserIdAndType(userId,collectId,type);
    }

    @Override
    public int count(Long collectId, int type) {
        return collectMapper.count(collectId,type);
    }
}
